<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
    <include file="Inc/basic_css"/>
    <include file="Inc/basic_js"/>
    <import type="js" basepath="__JS__" file="AjaxFileUpload,imgpre,admin" />
    <import type="js" basepath="__PLUGIN__" file="ueditor.ueditor#config,ueditor.ueditor#all#min,ueditor.lang.zh-cn.zh-cn" />
    <link rel="stylesheet" type="text/css" href="__PLUGIN__/bootstrap-datepicker/css/datepicker.css" />
    <script type="text/javascript" src="__PLUGIN__/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>

</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed">
<!-- BEGIN HEADER -->
<include file="Inc/head"/>
<!-- END HEADER -->
<div class="clearfix"></div>
<!-- BEGIN CONTAINER -->
<div class="page-container">
    <!-- BEGIN SIDEBAR -->
    <include file="Inc/left"/>
    <!-- END SIDEBAR -->
    <!-- BEGIN PAGE -->
    <div class="page-content">

        <!-- BEGIN STYLE CUSTOMIZER -->
        <include file="Inc/theme"/>
        <!-- END BEGIN STYLE CUSTOMIZER -->
        <!-- BEGIN PAGE HEADER-->
        <div class="row">
            <div class="col-md-12">
                <!-- BEGIN PAGE TITLE & BREADCRUMB-->
                <h3 class="page-title">
                    {$cfg.title}<if condition="$dataInfo.id gt 0 ">修改信息<else />添加信息</if> <small></small>
                </h3>
                <ul class="page-breadcrumb breadcrumb">
                    <li><i class="fa fa-home"></i><a href="{:U('Index/index')}">首页</a> <i class="fa fa-angle-right"></i></li>
                    <li><a href="#">商品信息</a><i class="fa fa-angle-right"></i></li>
                    <li><a href="#">{$cfg.title}<if condition="$dataInfo.id gt 0 ">修改信息<else />添加信息</if></a><i class="fa fa-angle-right"></i></li>
                    <li><a href="#">{$lang}</a></li>
                </ul>					<!-- END PAGE TITLE & BREADCRUMB-->
            </div>
        </div>
        <!-- END PAGE HEADER-->
        <!-- BEGIN PAGE CONTENT-->
        <div class="row">
            <div class="col-md-12">
                <!-- BEGIN EXAMPLE TABLE PORTLET-->
                <div class="portlet">
                    <!--
                    <div class="portlet-title">
                        <div class="caption">
                            <i class="fa fa-reorder"></i>站点信息
                        </div>
                    </div>-->
                    <form class="form-horizontal" action="{:U('Reply/save')}"  id="submit_form" method="Post">
                        
                        <input type="hidden" name="back_url" value="{$back_url}" />
                        <div class="portlet-body form">
                            <!-- BEGIN FORM-->
                            <div class="form-body">
                                <div class="form-group">
                                    <label class="col-md-3 control-label">订单号：</label>
                                    <div class="col-md-4" style="margin-top:6px;">
                                       <?php echo $reply['order_detail']['order_no']?>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-md-3 control-label">评论状态：</label>
                                    <div class="col-md-4" style="margin-top:6px;">
                                       <?php echo $statusArr[$reply['status']]?>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-md-3 control-label">购买用户</label>
                                    <div class="col-md-4" style="margin-top:6px;">
                                       {$reply.member}
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-md-3 control-label">用户头像：</label>
                                    <div class="col-md-4" style="margin-top:6px;">
                                        <img src="{$reply.avatar}" width="70px">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-md-3 control-label">用户昵称：</label>
                                    <div class="col-md-4" style="margin-top:6px;">
                                        {$reply.nickname}
                                    </div>
                                </div>
                                <div role="grid" class="dataTables_wrapper form-inline">
                        <!-- /.row -->
                        <div class="table-scrollable" id="listArea" style="border:0px;">
                            <form method="post" name="myform" id="myform">
                                <table class="table table-striped table-bordered table-advance table-hover">

                                    <thead>
                                    <tr>
                                        <!-- <th align="center"><i class="fa fa-check-square"> 选中</th> -->
                                        <th align="center">产品名称</th>
                                        <th align="center">图片</th>
                                        <th align="center" >数量</th>
                                        <th align="center" >单价</th>
                                        <th align="center" >实付总价</th>
                                        <th align="center" >型号</th>
                                        
                                        
                                    </tr>
                                    </thead>
                                    <tbody>

                                    
                                        <tr>
                                        <td align="center"><?php echo $reply['order_detail']['title_cn']?></td>
                                        <td align="center" ><a title="点击预览" data-toggle="modal" href="#img_preview" onclick="$('#preview').attr('src','__UPLOAD__/<?php echo $reply['order_detail']['pic_path']?>')"><img src="__UPLOAD__/<?php echo $reply['order_detail']['pic_path']?>" width="80" height="30" rel="__UPLOAD__/<?php echo $reply['order_detail']['pic_path']?>" class="preview" /></a></td>
                                        <td align="center" ><?php echo $reply['order_detail']['num']?></td>
                                        <td align="center" ><?php echo $reply['order_detail']['unit_price']?></td>
                                        <td align="center" ><?php echo $reply['order_detail']['price']?></td>
                                        <td align="center" ><?php foreach(reply['order_detail']['attribute_cn'] as $k=>$v){echo $v->attr_key.':'.$v->attr_value."<br>";}?></td>
                                        <!-- <th align="center" >{$item.store_title_cn}</th> -->
                                        
                                        </tr>
                                    
                                    </tbody>
                                </table>
                                
                            </form>
                        </div>
                        
                    </div>
                    <div class="form-group">
                                    <label class="col-md-3 control-label">用户评论</label>
                                    <div class="col-md-4" style="margin-top:6px;">
                                        {$reply.text}
                                    </div>
                                    
                                </div>
                                <div class="form-group">
                                    <label class="col-md-3 control-label"></label>
                                    <div class="col-md-4" style="margin-top:6px;">
                                        <?php foreach($reply['pics'] as $k=>$v){?>
                                            <img src="__UPLOAD__/<?php echo $v;?>" width="70px">
                                        <?php }?>
                                    </div>
                                    
                                </div>
                                <input type="hidden" name="id" value="<?php echo $reply['id'];?>" />
                        <?php if($reply['status'] == 0){?>
                        
                        <input type="hidden" name="status" value="1" />
                        <div class="form-group">
                                    <label class="col-md-3 control-label">回复内容：</label>
                                    <div class="col-md-4">
                                        <textarea class="form-control" rows="3" name="relay"></textarea>
                                    </div>
                                </div>
                        
                                
                        <?php }else{?>
                            <div class="form-group">
                                    <label class="col-md-3 control-label">回复内容：</label>
                                    <div class="col-md-4" style="margin-top:6px;">
                                       <?php echo $reply['relay'];?>
                                    </div>
                                </div>
                        <?php }?>
                        <div class="form-group">
                                    <label class="col-md-3 control-label">评论排序：</label>
                                    <div class="col-md-4">
                                        <input type="text" class="form-control" name="listorder" value="{$reply["listorder"]}"/>
                                    </div>
                                </div>
                        <div class="col-md-offset-3 col-md-9">
                                <button class="btn green" type="submit">回复</button>
                                <button class="btn default" type="button" id="cancel" onclick="history.go(-1)">返回</button>
                            </div>
                            </div>
                        </div>
                        
                    </form>
                    <!-- END FORM-->



                </div>
            </div>
            <!-- END EXAMPLE TABLE PORTLET-->
        </div>
    </div>
    <!-- END PAGE CONTENT -->
</div>
<!-- END CONTAINER -->
<!-- BEGIN FOOTER -->
<include file="Inc/foot"/>
<!-- END FOOTER -->
<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->

<!-- END CORE PLUGINS -->
<!-- BEGIN PAGE LEVEL SCRIPTS -->
<script src="__JS__/app.js" type="text/javascript"></script>
<script src="__JS__/form-components.js"></script>
<script src="__JS__/controllers/new/edit.js" type="text/javascript"></script>
<!-- END PAGE LEVEL SCRIPTS -->
<script>
    jQuery(document).ready(function() {
        App.init(); // initlayout and core plugins
        NewValidation.init();
        FormComponents.init();
    });
</script>
<script language="javascript">

    function findNext(v , e , dom){
        var selValue = parseInt(v);
        var areaNextId = parseInt(e+1);
        $("#"+dom+"_"+areaNextId).remove();
        $("#"+dom+"_"+e+" > select > option").each(function(i){
            if($(this).attr('value') == v){
                $(this).attr('selected',true);
            }
        });


        var data = { r: Math.random(),selValue: selValue,areaNextId: areaNextId ,domId: dom};
        $.ajax({type:"GET", url:"<php>echo U('ScenicArea/ajaxFindNext');</php>",data: data, dataType:"text",async:false,success:function (msg){
        r = msg;
        }});
    if (r==0) {
        return false;
    } else {
        r='<div class="radio-inline">'+r+'</div>';
        $('#'+dom+'_'+e).append(r);
        return true;
    }


    }

    $(function(){
        {$content}
    });

</script>
</body>
<!-- END BODY -->
</html>